<?php
if (isset($loc)) {
	if (!is_null($loc))
		$loc .= " &gt;&gt;";
}

if (isset($progress) && is_array($progress))
{	
	echo "<tr>\n";
	echo "	<td>\n";
	echo "		<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
	echo "			<tr>\n";
	echo "				<td align=\"left\" valign=\"top\" width=\"12\"><img src=\"images/spacer.gif\" width=\"12\" height=\"20\"></td>\n";
	echo "				<td width=\"70\" align=\"left\" valign=\"middle\" class=\"locationIndicatorText\">progress:</td>\n";
	echo "				<td width=\"5\" align=\"left\" valign=\"middle\"><img src=\"images/spacer.gif\" width=\"5\"></td>\n";
	
	for ($p=0;$p<(int)$progress['total'];$p++)
	{
		if ($p<(int)$progress['full'])
			echo "				<td width=\"5\" align=\"left\" valign=\"middle\"><img src=\"images/progressBar_full.gif\"></td>\n";
		else
			echo "				<td width=\"5\" align=\"left\" valign=\"middle\"><img src=\"images/progressBar_empty.gif\"></td>\n";		
	}	
	echo "				<td width=\"100%\" align=\"left\" valign=\"middle\">&nbsp;</td>\n";
	echo "			</tr>\n";
	echo "		</table>\n";
	echo "	</td>\n";
	echo "</tr>\n";
}

if(($ci instanceof courseInstance) && !is_null($ci->getCourseInstanceID())) {
	if (!$ci->course instanceof course) $ci->getCourseForUser($u->getUserID());
	if (isset($ci->course)) $currentClass = $ci->course->displayCourseNo() . " " . $ci->course->getName();
} else {
	$currentClass = "";
}

echo "		<div id=\"Location\">\n";
echo "			<div class=\"locationIndicatorText\"> $loc </div>\n";
echo "			<div class=\"currentClass\"> $currentClass </div>\n";
echo "			<div class=\"clear\"></div>\n";
echo "		</div>\n";


